package tedexis.mercurio.transformers;

import gurulab.maya.common.PhoneAddress;
import gurulab.merlin.core.envelope.Envelope;
import gurulab.merlin.core.router.EnvelopeTransformer;
import gurulab.merlin.core.router.Route;
import gurulab.merlin.core.router.transformation.AbstractEnvelopeTransformer;

public class TestTransformers {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try{
			//Digitel
			//Envelope e = new Envelope("el mensaje",new PhoneAddress("58","412","12345"),new PhoneAddress("58","412","67890"));
			
			//Movilnet
			//Envelope e = new Envelope("el mensaje",new PhoneAddress("","","15812345"),new PhoneAddress("","","15867890"));
			
			//Movistar
			Envelope e = new Envelope("el mensaje",new PhoneAddress("","","02704141234"),new PhoneAddress("","","02704145678"));
			e.setDestinationRoute(new Route("",""));
			e.setOriginRoute(new Route("","movistar"));
			EnvelopeTransformer et = new AbstractEnvelopeTransformer("C:/mercurio2/prd/etc/envelopeTransformer.xml").getTransformerByPeer("movistar");
			et.transform(e);
		}catch(Exception exc){
			exc.printStackTrace();
		}
	}
}
